{% extends 'layout.html' %}
{% block main %}
<ol class="breadcrumb">
    <li><a href="/admin">管理首页</a></li>
    <li><span>分类列表</span></li>
  </ol>
  <h3>分类列表</h3>
  <table class="table table-hover table-bordered table-striped">
      <tr>
          <th>ID</th>
          <th>分类名称</th>
          <th>操作</th>
      </tr>
      {% for cate in cateList %}
      <tr>
          <td>{{cate._id.toString()}}</td>
          <td>{{cate.name}}</td>
          <td>
              <a class="text-info" role="button" href="/admin/category/edit?id={{cate._id.toString()}}">编辑</a>|
              <a class="text-danger" role="button" href="/admin/category/delete?id={{cate._id.toString()}}">删除</a>
          </td>
      </tr>
      {% endfor %}
  </table>
{% include 'page.html' %}
{% endblock %}